﻿-- =============================================
-- Author:		GMH
-- Create date: 07/0/2012
-- Description:	spObtenPaquetes null, 1
-- =============================================
CREATE PROCEDURE spObtenPaquetes
	@psDescripcion		VARCHAR(250),
	@pnIdLaboratorio	INT
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;

    -- Insert statements for procedure here
	SELECT	IdLaboratorio ,
	        IdPaquete ,
	        Descripcion ,
	        Precio ,
	        FechaMod ,
	        IpMod ,
	        IdUsuarioMod
	FROM	dbo.PaqueteEstudio
	WHERE	(Descripcion LIKE '%' + @psDescripcion + '%' OR @psDescripcion IS NULL)
	AND		IdLaboratorio	= @pnIdLaboratorio
	AND		ISNULL(BajaLogica,0)	= 0
	
	SET NOCOUNT OFF;
END